package Skin.HSlider
{
	import mx.skins.halo.SliderTrackSkin;
	import mx.styles.StyleManager;
	import mx.utils.ColorUtil;
	import flash.display.GradientType;
	public class MySliderTrackSkin extends SliderTrackSkin
	{
		public function MySliderTrackSkin()
		{
			super();
		}
		
		override public function get measuredHeight():Number
		{
			return 7;
		}
		
		override protected function updateDisplayList(w:Number, h:Number):void
		{
			super.updateDisplayList(w, h);

		// User-defined styles.
		var borderColor:Number = getStyle("borderColor");
		var fillAlphas:Array = getStyle("fillAlphas");
		var fillColors:Array = getStyle("trackColors") as Array;
		StyleManager.getColorNames(fillColors);
		
		// Derivative styles.
		var borderColorDrk:Number =
			ColorUtil.adjustBrightness2(borderColor, -50);
		
		graphics.clear();
		
		drawRoundRect(0,0,w,h,2,0xd0d4d6,1,null,GradientType.RADIAL,null); // Draw a transparent rect to fill the entire space
		
 		drawRoundRect(
			0, 0, w, 1.5, 2,
			0x6a6c6e, 1,null,
			GradientType.RADIAL,null);
		

		drawRoundRect(
			0, h-1, w,1, 2,
			0x888a8b, 1,null,
			GradientType.RADIAL,null);

/*  		drawRoundRect(
			2, 1, w - 2, h - 2, 1,
			0xEDEDED, 1, null,
			GradientType.LINEAR, null,
			{ x: 2, y: 1, w: w - 2, h: 1, r: 0 });
		
		drawRoundRect(
			2, 1, w - 2, 1, 0,
			fillColors, Math.max(fillAlphas[1] - 0.3, 0),
			horizontalGradientMatrix(2, 1, w - 2, 1));  */ 
		}
		
	}
}